s = "abc", t = "ahbgdc"
s = "axc", t = "ahbgdc"

var isSubsequence = function (s, t) {
    let m = s.length, n = t.length
    let i = 0, j = 0
    while (i < m && j < n) {
        if (s[i] === t[j]) {
            i++
        }
        j++
    }
    return i === m
};
console.log(isSubsequence(s, t));
